package com.central.scheduler.master.dispatch.executor;

import com.central.scheduler.master.dispatch.executor.context.ExecutionContext;
import com.central.scheduler.master.dispatch.executor.exceptions.ExecuteException;

/**
 * @author Tindy
 * @date 2021/11/5
 * @describe
 *  abstract executor manager
 */
public abstract class AbstractExecutorManager<T> implements ExecutorManager<T>{

    /**
     * before execute , add time monitor ， timeout
     *
     * @param context context
     * @throws ExecuteException if error throws ExecuteException
     */
    @Override
    public void beforeExecute(ExecutionContext context) throws ExecuteException {
    }

    /**
     * after execute , add dispatch monitor
     * @param context context
     * @throws ExecuteException if error throws ExecuteException
     */
    @Override
    public void afterExecute(ExecutionContext context) throws ExecuteException {
    }
}
